package deom1;

public class Login{
    private String account = "123456";
    private String passord = "888888";

    public void loginInfo(String userAccount,String userPassword) throws EnterAccountException,EnterPasswordException{
        if(!userAccount.equals(account)) {
            throw new EnterAccountException("账号输入错误！");
        }

        if(!userPassword.equals(passord)) {
            throw new EnterPasswordException("密码输入错误！");
        }

        System.out.println("输入正确，登录成功！");
    }
}
